**************************************************************************************************************************************************************************
*** do-file replication for Vanagt, J. & Russo, L. (2024) Affect, Not Money: A Comparative Study on Economic Hardship and Affective Polarisation. Research & Politics. ***
**************************************************************************************************************************************************************************

*********************************************
*** Belgian-Dutch dataset (abbrev.: laps) ***
*********************************************

* clear
clear all
estimates clear

* working directory
cd "[insert working directory]"

* log file
log using log_laps

* graph style
set scheme s1mono
graph set window fontface "Times New Roman"

* dataset
use laps, clear

**************************
*** correlation matrix ***
**************************

pwcorr p_wap_parties p_wap_voters p_social_distance_frnd p_social_distance_rom b_income b_incsec b_buffer b_jobloss b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2, sig
matrix C = r(C)
matrix sig = r(sig)
heatplot C, values(label(sig)) lower nodraw generate
gen str lab = string(_Z, "%9.2f") + cond(_Mlab<.001, "***", cond(_Mlab<.01, "**", cond(_Mlab<.05, "*", "")))
heatplot C, color(hcl diverging, intensity(.5)) lower legend(off) aspectratio(0.6) label xlabel(,labsize(tiny) angle(45)) ylabel(,labsize(tiny)) ///
    addplot(scatter _Y _X, msymbol(i) mlab(lab) mlabpos(0) mlabcolor(black) mlabsize(tiny) plotregion(margin(tiny)))
graph save "figures/correlation_laps.gph", replace
graph export "figures/correlation_laps.png", replace
drop _Z _Zid _Y _Yshape _X _Xshape _Mlab lab

***************************
*** regression analysis ***
***************************

*** parties ***
xi: regress p_wap_parties b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_income
xi: regress p_wap_parties b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_incsec
xi: regress p_wap_parties b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_buffer
xi: regress p_wap_parties i.b_jobinsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobinsec
xi: regress p_wap_parties b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobloss
xi: regress p_wap_parties b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobfind

*** voters ***
xi: regress p_wap_voters b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_income
xi: regress p_wap_voters b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_incsec
xi: regress p_wap_voters b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_buffer
xi: regress p_wap_voters i.b_jobinsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_jobinsec
xi: regress p_wap_voters b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_jobloss
xi: regress p_wap_voters b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_jobfind

*** social distance friend ***
xi: regress p_social_distance_frnd b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_income
xi: regress p_social_distance_frnd b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_incsec
xi: regress p_social_distance_frnd b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_buffer
xi: regress p_social_distance_frnd i.b_jobinsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_jobinsec
xi: regress p_social_distance_frnd b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_jobloss
xi: regress p_social_distance_frnd b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_jobfind

*** social distance partner ***
xi: regress p_social_distance_rom b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_income
xi: regress p_social_distance_rom b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_incsec
xi: regress p_social_distance_rom b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_buffer
xi: regress p_social_distance_rom b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_jobloss
xi: regress p_social_distance_rom b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_jobfind
xi: regress p_social_distance_rom i.b_jobinsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_jobinsec

*** label variables ***
label variable _Ib_jobinse_1 "Upscale"
label variable _Ib_jobinse_2 "Insider"
label variable _Ib_jobinse_3 "Self-empl. without employees"
label variable _Ib_jobinse_4 "Outsider"
label variable p_wap_parties "Like-Dislike (parties)"
label variable p_wap_voters "Like-Dislike (voters)"
label variable p_social_distance_frnd "Social distance (friend)"
label variable p_social_distance_rom "Social distance (partner)"
label variable p_pp2 "Positive partisanship"
label variable p_np "Negative partisanship"
label variable p_idextr_abs "Ideological extremism" 
label variable b_gender "Male"
label variable b_income "Household income"
label variable b_incsec "Income insecurity"
label variable b_buffer "Income buffer"
label variable b_jobloss "Worry over losing job"
label variable b_jobfind "Worry over finding no (new) job"
label variable b_age "Age (years)"
label variable p_int "Political interest"
label variable b_education2 "Tertiary education"

*** regression tables ***
esttab model_income model_incsec model_buffer using "tables/laps_party_1.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results (Small Dataset): Household Income, Income Insecurity \& Income Buffer (in Fig. \ref{fig:likedislike\_small}) \label{tab:likedislike\_smallparty1}) substitute(\_ _)

esttab model_jobinsec model_jobloss model_jobfind using "tables/laps_party_2.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(_Ib_jobinse_1 _Ib_jobinse_2 _Ib_jobinse_3 _Ib_jobinse_4 b_jobloss b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results (Small Dataset): Job Insecurity, Job Loss \& Job Find (in Fig. \ref{fig:likedislike\_small}) \label{tab:likedislike\_smallparty2}) substitute(\_ _)

esttab modelvoter_income modelvoter_incsec modelvoter_buffer using "tables/laps_voter_1.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("like-dislike voter" "like-dislike voter" "like-dislike voter") interaction(" X ") replace title(Regression Results (Small Dataset): Household Income, Income Insecurity \& Income Buffer (in Fig. \ref{fig:likedislike\_small}) \label{tab:likedislike\_smallvoter1}) substitute(\_ _)

esttab modelvoter_jobinsec modelvoter_jobloss modelvoter_jobfind using "tables/laps_voter_2.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(_Ib_jobinse_1 _Ib_jobinse_2 _Ib_jobinse_3 _Ib_jobinse_4 b_jobloss b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("like-dislike voter" "like-dislike voter" "like-dislike voter") interaction(" X ") replace title(Regression Results (Small Dataset): Job Insecurity, Job Loss \& Job Find (in Fig. \ref{fig:likedislike\_small}) \label{tab:likedislike\_smallvoter2}) substitute(\_ _)

esttab modelfrnd_income modelfrnd_incsec modelfrnd_buffer using "tables/laps_frnd_1.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("soc. dist. friend" "soc. dist. friend" "soc. dist. friend") interaction(" X ") replace title(Regression Results (Small Dataset): Household Income, Income Insecurity \& Income Buffer (in Fig. \ref{fig:socdist\_small}) \label{tab:socdist\_smallfrnd1}) substitute(\_ _)

esttab modelfrnd_jobinsec modelfrnd_jobloss modelfrnd_jobfind using "tables/laps_frnd_2.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(_Ib_jobinse_1 _Ib_jobinse_2 _Ib_jobinse_3 _Ib_jobinse_4 b_jobloss b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("soc. dist. friend" "soc. dist. friend" "soc. dist. friend") interaction(" X ") replace title(Regression Results (Small Dataset): Job Insecurity, Job Loss \& Job Find (in Fig. \ref{fig:socdist\_small}) \label{tab:socdist\_smallfrnd2}) substitute(\_ _)

esttab modelrom_income modelrom_incsec modelrom_buffer using "tables/laps_rom_1.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("soc. dist. partner" "soc. dist. partner" "soc. dist. partner") interaction(" X ") replace title(Regression Results (Small Dataset): Household Income, Income Insecurity \& Income Buffer (in Fig. \ref{fig:socdist\_small}) \label{tab:socdist\_smallrom1}) substitute(\_ _)

esttab modelrom_jobinsec modelrom_jobloss modelrom_jobfind using "tables/laps_rom_2.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(_Ib_jobinse_1 _Ib_jobinse_2 _Ib_jobinse_3 _Ib_jobinse_4 b_jobloss b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("soc. dist. partner" "soc. dist. partner" "soc. dist. partner") interaction(" X ") replace title(Regression Results (Small Dataset): Job Insecurity, Job Loss \& Job Find (in Fig. \ref{fig:socdist\_small}) \label{tab:socdist\_smallrom2}) substitute(\_ _)

*** coefficient plots ***
coefplot (model_income, pstyle(p4)) (model_incsec, pstyle(p6)) (model_jobinsec, pstyle(p5)) (model_buffer, pstyle(p7)) (model_jobloss, pstyle(p8)) (model_jobfind, pstyle(p9)), bylabel(Like-Dislike (Party)) || (modelvoter_income, pstyle(p4)) (modelvoter_incsec, pstyle(p6)) (modelvoter_jobinsec, pstyle(p5)) (modelvoter_buffer, pstyle(p7)) (modelvoter_jobloss, pstyle(p8)) (modelvoter_jobfind, pstyle(p9)), bylabel(Like-Dislike (Voter)) ||, drop(_cons _Icountry_* b_age b_gender b_education2 _Ip_party*) xline(0) order(b_income . b_incsec b_buffer . _Ib_jobinse_1 _Ib_jobinse_2 _Ib_jobinse_3 _Ib_jobinse_4 . b_jobloss b_jobfind . p_pp2 p_np p_int p_idextr_abs) xtitle(Unstandardised coefficients) byopts(legend(off))
graph export "figures/coefplot_laps_like-dislike.png", replace

coefplot (modelfrnd_income, pstyle(p4)) (modelfrnd_incsec, pstyle(p6)) (modelfrnd_jobinsec, pstyle(p5)) (modelfrnd_buffer, pstyle(p7)) (modelfrnd_jobloss, pstyle(p8)) (modelfrnd_jobfind, pstyle(p9)), bylabel(Social Distance (Friend)) ||(modelrom_income, pstyle(p4)) (modelrom_incsec, pstyle(p6)) (modelrom_jobinsec, pstyle(p5)) (modelrom_buffer, pstyle(p7)) (modelrom_jobloss, pstyle(p8)) (modelrom_jobfind, pstyle(p9)), bylabel(Social Distance (Partner)) ||, drop(_cons _Icountry_* b_age b_gender b_education2 _Ip_party*) xline(0) order(b_income . b_incsec b_buffer . _Ib_jobinse_1 _Ib_jobinse_2 _Ib_jobinse_3 _Ib_jobinse_4 . b_jobloss b_jobfind . p_pp2 p_np p_int p_idextr_abs) xtitle(Unstandardised coefficients) byopts(legend(off))
graph export "figures/coefplot_laps_socdist.png", replace

***************************************
*** robustness check: less controls ***
***************************************

*** parties ***
xi: regress p_wap_parties b_income b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_income
xi: regress p_wap_parties b_incsec b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_incsec
xi: regress p_wap_parties b_buffer b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_buffer
xi: regress p_wap_parties i.b_jobinsec b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobinsec
xi: regress p_wap_parties b_jobloss b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobloss
xi: regress p_wap_parties b_jobfind b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobfind

*** voters ***
xi: regress p_wap_voters b_income b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_income
xi: regress p_wap_voters b_incsec b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_incsec
xi: regress p_wap_voters b_buffer b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_buffer
xi: regress p_wap_voters i.b_jobinsec b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_jobinsec
xi: regress p_wap_voters b_jobloss b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_jobloss
xi: regress p_wap_voters b_jobfind b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_jobfind

*** social distance friend ***
xi: regress p_social_distance_frnd b_income b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_income
xi: regress p_social_distance_frnd b_incsec b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_incsec
xi: regress p_social_distance_frnd b_buffer b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_buffer
xi: regress p_social_distance_frnd i.b_jobinsec b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_jobinsec
xi: regress p_social_distance_frnd b_jobloss b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_jobloss
xi: regress p_social_distance_frnd b_jobfind b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_jobfind

*** social distance partner ***
xi: regress p_social_distance_rom b_income b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_income
xi: regress p_social_distance_rom b_incsec b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_incsec
xi: regress p_social_distance_rom b_buffer b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_buffer
xi: regress p_social_distance_rom b_jobloss b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_jobloss
xi: regress p_social_distance_rom b_jobfind b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_jobfind
xi: regress p_social_distance_rom i.b_jobinsec b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_jobinsec

*** label variables ***
label variable _Ib_jobinse_1 "Upscale"
label variable _Ib_jobinse_2 "Insider"
label variable _Ib_jobinse_3 "Self-empl. without employees"
label variable _Ib_jobinse_4 "Outsider"
label variable p_wap_parties "Like-Dislike (parties)"
label variable p_wap_voters "Like-Dislike (voters)"
label variable p_social_distance_frnd "Social distance (friend)"
label variable p_social_distance_rom "Social distance (partner)"
label variable p_pp2 "Positive partisanship"
label variable p_np "Negative partisanship"
label variable p_idextr_abs "Ideological extremism" 
label variable b_gender "Male"
label variable b_income "Household income"
label variable b_incsec "Income insecurity"
label variable b_buffer "Income buffer"
label variable b_jobloss "Worry over losing job"
label variable b_jobfind "Worry over finding no (new) job"
label variable b_age "Age (years)"
label variable p_int "Political interest"
label variable b_education2 "Tertiary education"

*** regression tables ***
esttab model_income model_incsec model_buffer using "tables/laps_party_1_lesscontrols.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results With Less Controls (Small Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab model_jobinsec model_jobloss model_jobfind using "tables/laps_party_2_lesscontrols.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(_Ib_jobinse_1 _Ib_jobinse_2 _Ib_jobinse_3 _Ib_jobinse_4 b_jobloss b_jobfind b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results With Less Controls (Small Dataset): Job Insecurity, Job Loss \& Job Find) substitute(\_ _)

esttab modelvoter_income modelvoter_incsec modelvoter_buffer using "tables/laps_voter_1_lesscontrols.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer b_age b_gender b_education2) mtitles("like-dislike voter" "like-dislike voter" "like-dislike voter") interaction(" X ") replace title(Regression Results With Less Controls (Small Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab modelvoter_jobinsec modelvoter_jobloss modelvoter_jobfind using "tables/laps_voter_2_lesscontrols.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(_Ib_jobinse_1 _Ib_jobinse_2 _Ib_jobinse_3 _Ib_jobinse_4 b_jobloss b_jobfind b_age b_gender b_education2) mtitles("like-dislike voter" "like-dislike voter" "like-dislike voter") interaction(" X ") replace title(Regression Results With Less Controls (Small Dataset): Job Insecurity, Job Loss \& Job Find) substitute(\_ _)

esttab modelfrnd_income modelfrnd_incsec modelfrnd_buffer using "tables/laps_frnd_1_lesscontrols.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer b_age b_gender b_education2) mtitles("soc. dist. friend" "soc. dist. friend" "soc. dist. friend") interaction(" X ") replace title(Regression Results With Less Controls (Small Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab modelfrnd_jobinsec modelfrnd_jobloss modelfrnd_jobfind using "tables/laps_frnd_2_lesscontrols.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(_Ib_jobinse_1 _Ib_jobinse_2 _Ib_jobinse_3 _Ib_jobinse_4 b_jobloss b_jobfind b_age b_gender b_education2) mtitles("soc. dist. friend" "soc. dist. friend" "soc. dist. friend") interaction(" X ") replace title(Regression Results With Less Controls (Small Dataset): Job Insecurity, Job Loss \& Job Find) substitute(\_ _)

esttab modelrom_income modelrom_incsec modelrom_buffer using "tables/laps_rom_1_lesscontrols.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer b_age b_gender b_education2) mtitles("soc. dist. partner" "soc. dist. partner" "soc. dist. partner") interaction(" X ") replace title(Regression Results With Less Controls (Small Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab modelrom_jobinsec modelrom_jobloss modelrom_jobfind using "tables/laps_rom_2_lesscontrols.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(_Ib_jobinse_1 _Ib_jobinse_2 _Ib_jobinse_3 _Ib_jobinse_4 b_jobloss b_jobfind b_age b_gender b_education2) mtitles("soc. dist. partner" "soc. dist. partner" "soc. dist. partner") interaction(" X ") replace title(Regression Results With Less Controls (Small Dataset): Job Insecurity, Job Loss \& Job Find) substitute(\_ _)


***************************************
*** robustness check: non-linearity ***
***************************************

recode b_income (1 11 = 5) (2 10 = 4) (3 9 = 3) (4 8 = 2) (5 7 = 1) (6 = 0), gen (b_income_rec)
recode b_incsec (1 7 = 3) (2 6 = 2) (3 5 = 1) (4 = 0), gen(b_incsec_rec)
recode b_buffer (1 7 = 3) (2 6 = 2) (3 5 = 1) (4 = 0), gen(b_buffer_rec)
recode b_jobloss (1 7 = 3) (2 6 = 2) (3 5 = 1) (4 = 0), gen(b_jobloss_rec)
recode b_jobfind (1 7 = 3) (2 6 = 2) (3 5 = 1) (4 = 0), gen(b_jobfind_rec)

*** parties ***
xi: regress p_wap_parties b_income_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_income
xi: regress p_wap_parties b_incsec_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_incsec
xi: regress p_wap_parties b_buffer_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_buffer
xi: regress p_wap_parties b_jobloss_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobloss
xi: regress p_wap_parties b_jobfind_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobfind

*** voters ***
xi: regress p_wap_voters b_income_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_income
xi: regress p_wap_voters b_incsec_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_incsec
xi: regress p_wap_voters b_buffer_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_buffer
xi: regress p_wap_voters b_jobloss_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_jobloss
xi: regress p_wap_voters b_jobfind_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_jobfind

*** social distance friend ***
xi: regress p_social_distance_frnd b_income_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_income
xi: regress p_social_distance_frnd b_incsec_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_incsec
xi: regress p_social_distance_frnd b_buffer_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_buffer
xi: regress p_social_distance_frnd b_jobloss_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_jobloss
xi: regress p_social_distance_frnd b_jobfind_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelfrnd_jobfind

*** social distance partner ***
xi: regress p_social_distance_rom b_income_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_income
xi: regress p_social_distance_rom b_incsec_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_incsec
xi: regress p_social_distance_rom b_buffer_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_buffer
xi: regress p_social_distance_rom b_jobloss_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_jobloss
xi: regress p_social_distance_rom b_jobfind_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelrom_jobfind

*** label variables ***
label variable p_wap_parties "Like-Dislike (parties)"
label variable p_wap_voters "Like-Dislike (voters)"
label variable p_social_distance_frnd "Social distance (friend)"
label variable p_social_distance_rom "Social distance (partner)"
label variable p_pp2 "Positive partisanship"
label variable p_np "Negative partisanship"
label variable p_idextr_abs "Ideological extremism" 
label variable b_gender "Male"
label variable b_income_rec "Household income (recoded)"
label variable b_incsec_rec "Income insecurity (recoded)"
label variable b_buffer_rec "Income buffer (recoded)"
label variable b_jobloss_rec "Worry over losing job (recoded)"
label variable b_jobfind_rec "Worry over finding no (new) job (recoded)"
label variable b_age "Age (years)"
label variable p_int "Political interest"
label variable b_education2 "Tertiary education"

*** regression tables ***
esttab model_income model_incsec model_buffer using "tables/laps_party_1_rec.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income_rec b_incsec_rec b_buffer_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results With Economic Variables Recoded as Distance From Midpoint (Small Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab model_jobloss model_jobfind using "tables/laps_party_2_rec.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_jobloss_rec b_jobfind_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results With Economic Variables Recoded as Distance From Midpoint (Small Dataset): Job Insecurity, Job Loss \& Job Find) substitute(\_ _)

esttab modelvoter_income modelvoter_incsec modelvoter_buffer using "tables/laps_voter_1_rec.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income_rec b_incsec_rec b_buffer_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("like-dislike voter" "like-dislike voter" "like-dislike voter") interaction(" X ") replace title(Regression Results With Economic Variables Recoded as Distance From Midpoint (Small Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab modelvoter_jobloss modelvoter_jobfind using "tables/laps_voter_2_rec.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_jobloss_rec b_jobfind_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("like-dislike voter" "like-dislike voter" "like-dislike voter") interaction(" X ") replace title(Regression Results With Economic Variables Recoded as Distance From Midpoint (Small Dataset): Job Insecurity, Job Loss \& Job Find) substitute(\_ _)

esttab modelfrnd_income modelfrnd_incsec modelfrnd_buffer using "tables/laps_frnd_1_rec.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income_rec b_incsec_rec b_buffer_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("soc. dist. friend" "soc. dist. friend" "soc. dist. friend") interaction(" X ") replace title(Regression Results With Economic Variables Recoded as Distance From Midpoint (Small Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab modelfrnd_jobloss modelfrnd_jobfind using "tables/laps_frnd_2_rec.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_jobloss_rec b_jobfind_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("soc. dist. friend" "soc. dist. friend" "soc. dist. friend") interaction(" X ") replace title(Regression Results With Economic Variables Recoded as Distance From Midpoint (Small Dataset): Job Insecurity, Job Loss \& Job Find) substitute(\_ _)

esttab modelrom_income modelrom_incsec modelrom_buffer using "tables/laps_rom_1_rec.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income_rec b_incsec_rec b_buffer_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("soc. dist. partner" "soc. dist. partner" "soc. dist. partner") interaction(" X ") replace title(Regression Results With Economic Variables Recoded as Distance From Midpoint (Small Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab modelrom_jobloss modelrom_jobfind using "tables/laps_rom_2_rec.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_jobloss_rec b_jobfind_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("soc. dist. partner" "soc. dist. partner" "soc. dist. partner") interaction(" X ") replace title(Regression Results With Economic Variables Recoded as Distance From Midpoint (Small Dataset): Job Insecurity, Job Loss \& Job Find) substitute(\_ _)

******************************************
*** robustness check: in-group ratings ***
******************************************

*** parties ***
xi: regress p_ingrouprating_party b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_income
xi: regress p_ingrouprating_party b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_incsec
xi: regress p_ingrouprating_party b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_buffer
xi: regress p_ingrouprating_party i.b_jobinsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobinsec
xi: regress p_ingrouprating_party b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobloss
xi: regress p_ingrouprating_party b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobfind

*** voters ***
xi: regress p_ingrouprating_voter b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_income
xi: regress p_ingrouprating_voter b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_incsec
xi: regress p_ingrouprating_voter b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_buffer
xi: regress p_ingrouprating_voter b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_jobloss
xi: regress p_ingrouprating_voter b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_jobfind
xi: regress p_ingrouprating_voter i.b_jobinsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_jobinsec

*** label variables ***
label variable _Ib_jobinse_1 "Upscale"
label variable _Ib_jobinse_2 "Insider"
label variable _Ib_jobinse_3 "Self-empl. without employees"
label variable _Ib_jobinse_4 "Outsider"
label variable p_pp2 "Positive partisanship"
label variable p_np "Negative partisanship"
label variable p_idextr_abs "Ideological extremism" 
label variable b_gender "Male"
label variable b_income "Household income"
label variable b_incsec "Income insecurity"
label variable b_buffer "Income buffer"
label variable b_jobloss "Worry over losing job"
label variable b_jobfind "Worry over finding no (new) job"
label variable b_age "Age (years)"
label variable p_int "Political interest"
label variable b_education2 "Tertiary education"

*** regression tables ***
esttab model_income model_incsec model_buffer using "tables/laps_party_1_in.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("in-group like party" "in-group like party" "in-group like party") interaction(" X ") replace title(Regression Results (Small Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab model_jobinsec model_jobloss model_jobfind using "tables/laps_party_2_in.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(_Ib_jobinse_1 _Ib_jobinse_2 _Ib_jobinse_3 _Ib_jobinse_4 b_jobloss b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("in-group like party" "in-group like party" "in-group like party") interaction(" X ") replace title(Regression Results (Small Dataset): Job Insecurity, Job Loss \& Job Find) substitute(\_ _)

esttab modelvoter_income modelvoter_incsec modelvoter_buffer using "tables/laps_voter_1_in.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("in-group like voter" "in-group like voter" "in-group like voter") interaction(" X ") replace title(Regression Results (Small Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab modelvoter_jobinsec modelvoter_jobloss modelvoter_jobfind using "tables/laps_voter_2_in.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(_Ib_jobinse_1 _Ib_jobinse_2 _Ib_jobinse_3 _Ib_jobinse_4 b_jobloss b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("in-group like voter" "in-group like voter" "in-group like voter") interaction(" X ") replace title(Regression Results (Small Dataset): Job Insecurity, Job Loss \& Job Find) substitute(\_ _)

*******************************************
*** robustness check: out-group ratings ***
*******************************************

*** parties ***
xi: regress p_outgrouprating_party b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_income
xi: regress p_outgrouprating_party b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_incsec
xi: regress p_outgrouprating_party b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_buffer
xi: regress p_outgrouprating_party i.b_jobinsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobinsec
xi: regress p_outgrouprating_party b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobloss
xi: regress p_outgrouprating_party b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobfind

*** voters ***
xi: regress p_outgrouprating_voter b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_income
xi: regress p_outgrouprating_voter b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_incsec
xi: regress p_outgrouprating_voter b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_buffer
xi: regress p_outgrouprating_voter b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_jobloss
xi: regress p_outgrouprating_voter b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_jobfind
xi: regress p_outgrouprating_voter i.b_jobinsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store modelvoter_jobinsec

*** label variables ***
label variable _Ib_jobinse_1 "Upscale"
label variable _Ib_jobinse_2 "Insider"
label variable _Ib_jobinse_3 "Self-empl. without employees"
label variable _Ib_jobinse_4 "Outsider"
label variable p_pp2 "Positive partisanship"
label variable p_np "Negative partisanship"
label variable p_idextr_abs "Ideological extremism" 
label variable b_gender "Male"
label variable b_income "Household income"
label variable b_incsec "Income insecurity"
label variable b_buffer "Income buffer"
label variable b_jobloss "Worry over losing job"
label variable b_jobfind "Worry over finding no (new) job"
label variable b_age "Age (years)"
label variable p_int "Political interest"
label variable b_education2 "Tertiary education"

*** regression tables ***
esttab model_income model_incsec model_buffer using "tables/laps_party_1_out.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("out-group dislike party" "out-group dislike party" "out-group dislike party") interaction(" X ") replace title(Regression Results (Small Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab model_jobinsec model_jobloss model_jobfind using "tables/laps_party_2_out.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(_Ib_jobinse_1 _Ib_jobinse_2 _Ib_jobinse_3 _Ib_jobinse_4 b_jobloss b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("out-group dislike party" "out-group dislike party" "out-group dislike party") interaction(" X ") replace title(Regression Results (Small Dataset): Job Insecurity, Job Loss \& Job Find) substitute(\_ _)

esttab modelvoter_income modelvoter_incsec modelvoter_buffer using "tables/laps_voter_1_out.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("out-group dislike voter" "out-group dislike voter" "out-group dislike voter") interaction(" X ") replace title(Regression Results (Small Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab modelvoter_jobinsec modelvoter_jobloss modelvoter_jobfind using "tables/laps_voter_2_out.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(_Ib_jobinse_1 _Ib_jobinse_2 _Ib_jobinse_3 _Ib_jobinse_4 b_jobloss b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("out-group dislike voter" "out-group dislike voter" "out-group dislike voter") interaction(" X ") replace title(Regression Results (Small Dataset): Job Insecurity, Job Loss \& Job Find) substitute(\_ _)

* close and safe log file
log close
translate log_laps.smcl log_laps.log

******************
*** END SCRIPT ***
******************
